package org.streets.context;

/**
 * 
 * @author dzb
 *
 */
public interface HiveContext {
	/**
	 * Context name
	 * @return
	 */
	public String name();
	/**
	 * Context startup root path
	 * @return
	 */
	public String root();
	/**
	 * Register Module Builder Class into HiveContext
	 * @param moduleClasses
	 * @return
	 */
	public HiveContext registerModules(Class<?>... moduleClasses);
	/**
	 * 
	 * @param moduleClassNames
	 * @return
	 */
	public HiveContext registerModules(String... moduleClassNames);
	/**
	 * Used when need to build one HiveRegistry instance use modules configs.
	 *
	 * We need build one global registry when applcation initialized and module config is modified.
	 *
	 * @return HiveRegistry instance
	 */
	public void startup();

	/**
	 * Fetch Service Registry
	 * @return
	 */
	public HiveRegistry registry();
	/**
	 * Shutdown context
	 */
	public void shutdown();
	/**
	 * Announce all services in registry
	 */
	public void announce();

}